{
 "cells": [
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 构建简单的图",
   "id": "ed2f8785ed3738e8"
  },
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2025-07-27T04:33:53.219966Z",
     "start_time": "2025-07-27T04:33:51.708340Z"
    }
   },
   "source": [
    "import operator\n",
    "from typing import Annotated\n",
    "\n",
    "from langgraph.graph import StateGraph, START, END\n",
    "from pydantic import BaseModel\n",
    "\n",
    "\n",
    "class SimpleState(BaseModel):\n",
    "    aggregate: Annotated[list, operator.add]\n",
    "\n",
    "\n",
    "def a(state: SimpleState):\n",
    "    print(f'Adding \"A\" to {state.aggregate}')\n",
    "    return {\"aggregate\": [\"A\"]}\n",
    "\n",
    "\n",
    "def b(state: SimpleState):\n",
    "    print(f'Adding \"B\" to {state.aggregate}')\n",
    "    return {\"aggregate\": [\"b\"]}\n",
    "\n",
    "\n",
    "def c(state: SimpleState):\n",
    "    print(f'Adding \"C\" to {state.aggregate}')\n",
    "    return {\"aggregate\": [\"C\"]}\n",
    "\n",
    "\n",
    "def d(state: SimpleState):\n",
    "    print(f'Adding \"D\" to {state.aggregate}')\n",
    "    return {\"aggregate\": [\"D\"]}\n",
    "\n",
    "\n",
    "builder = StateGraph(SimpleState)\n",
    "builder.add_node(a)\n",
    "builder.add_node(b)\n",
    "builder.add_node(c)\n",
    "builder.add_node(d)\n",
    "builder.add_edge(START, \"a\")\n",
    "builder.add_edge(\"a\", \"b\")\n",
    "builder.add_edge(\"a\", \"c\")\n",
    "builder.add_edge(\"b\", \"d\")\n",
    "builder.add_edge(\"c\", \"d\")\n",
    "builder.add_edge(\"d\", END)\n",
    "\n",
    "graph = builder.compile()"
   ],
   "outputs": [],
   "execution_count": 1
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-07-27T04:33:54.267592Z",
     "start_time": "2025-07-27T04:33:53.270520Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from IPython.display import Image, display\n",
    "\n",
    "display(Image(graph.get_graph().draw_mermaid_png()))"
   ],
   "id": "f8a18e6e2f52374b",
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAI8AAAGwCAIAAAAfWqEIAAAAAXNSR0IArs4c6QAAIABJREFUeJztnXlcVFXfwM/sO8OOgAIqIcomAqIpoiGiIq5p5pIZ5ZY9Lj2PlpUlvpWlLe/HbLHnfVotd8NUeMpUNHABCRExFwKUfRlmX+/Mff+YPuhTpKOec++cec73L+bOzO/3437n3Hvuveeey6FpGhAwgct2AYR7gNjCCWILJ4gtnCC2cILYwgk+W4lbb5iNOrtRR1FW2mJysFWG6wiEHB6fI1XwpQqef6hQKOYxXwOH4eOt6xf0tRcNv1XpwwdKKSstVfB9egltZhxsiThaFWXUUUadXd1m8+0l7Bcri0qSS+TM/eKZs3W1XFfyfWdopKTPAEm/WLlQjPdGuOGa8bcqQ/tNS3Bf8cM5/swkZcKWQUv98FWrVMF7OMdP4SNAnY5hzv/UdfpQZ8acwIEpXqhzIbd141fj0W9apy4L8e0lQpqIXYrzOxwOOm1aANIsaG213jCfOdI5ZUkouhTuQ0WRuqvNOmZmILoUCG1dKdNdLtVOXfpfocpJRVHXzSumnEUhiOKj2tV3NFnKj3X9V6kCAAxO9wnuJz59qBNRfCS2aAd9cn/742vCUAR3c5LH+jrsdM0FHYrgSGz9nN/RL06OIjIWDB7jXbSvA0Vk+LYMWuraL/rB6d7QI+OCzIv/UKK8okgNPTJ8WxVF6lEz0HZk3Z+HJ/vVVumhh4Vvq6pYEzZACj0sXvB4XL6AW1dtgBsWsq2Ga8bAPmKGzyrt3r371VdfvY8vvvDCC/n5+QgqAgCAvnGy2ovubssUlcR0/6K6uprhL7pC/ziZqs0KNyZkW+0NFpkXqnPSdXV1L7zwQmZm5tixY1evXl1RUQEAWLRo0aFDhw4fPpycnPzrr78CAHbt2rV8+fLRo0dnZWW9+OKLDQ0Nzq/v3LkzKyvrxIkTQ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v9IhIsUjG5fJsNnP3EovViKI8J3abnSfg8vjw99xIbCm8+e2tFIrIAICQ4CiTWRfZL8n5kqJsnV2N3so7Xa3gcDg+3sF1Ny6mj/h9yeUrxYjKcz7iWoLmmfVI9lu+wUJAI2lbAICJmUurLhedPX/Q4XDU1ld8vfulTz57lqLucjSaEDv2YvXxiotHAQDHTn1Z31CFqDwAgNVgQzRkA4mtiEGyjnpUp6L7hg9zkH/VAAACU0lEQVRetfTL2rqK194a/8nnz5nM+oVzNwsEd3kE7tj0halJU7478s7fX0m9fKV48oSVzjsbUFRoUBnCopHsF1Fdjdz3QaNQ6aXwl7rwWU/j1+N1CzdEiCTwN4aozhMOSlWYNGYXPuhpGFSm8EFyFKoQPp16YIrXmSP1ll4KkUzQ4wcuVP20J/+NHt+SSryMpp4vOqQmTckZ/zdYRdbWV/zf18/3+JbDYedwuD1OIDpq+OxxjzzzVzHbalTZTwXCqvAPIByXUVOpO12g6x3fc2/NYjUZ/uKChcViEol63u4LhVK5zBtikaqupnv9ilgkl0q9enxL06LnUsacZ4JhlNYDaEfRFHzeQgsVUh+mx7SyRfOllimLg6QKVFsstOMyJjzZq6GqlbKi6s27FTcrmkfkeKNTxcQ9JvNeDKsru+etDXY0VLXGjZCHDZAhzcLE6E+z0f6v9XX9h4eKpD33OHCn4WJrSobXgCQ56kQMjaymrI6v3rjhG+GrDEL762MYk87SeLEtfYbfQ4MRXn3thtF7TI7vaa+tMvr38/UKxP6o2Wam2q6rHDbb5EXBSn+GthlM3xGkarEW7eswmQBPJPQKlEq87nLGyN2wWShdu1HfbqSsthGT/AYkM9GkumHn3sj2BvP1C8brlXqegG8xUHwRny/mA+Cm40R5Ao7VYKOsFJfLMett4QNlA5JkEYNY2KSzPBeNXkMZNZRBazcb7Bazg8VK7oBAyBGKuTIvvlTB8w5kcyCXR80c5PF44D39HgyxhRPEFk4QWzhBbOEEsYUT/w/UtMXbdLjyewAAAABJRU5ErkJggg==",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "execution_count": 2
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-07-27T04:33:58.699296Z",
     "start_time": "2025-07-27T04:33:55.109073Z"
    }
   },
   "cell_type": "code",
   "source": "graph.invoke({\"aggregate\": []}, {\"configurable\": {\"thread_id\": \"foo\"}})",
   "id": "a4ce8ddd6e028a7d",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Adding \"A\" to []\n",
      "Adding \"B\" to ['A']\n",
      "Adding \"C\" to ['A']\n",
      "Adding \"D\" to ['A', 'b', 'C']\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'aggregate': ['A', 'b', 'C', 'D']}"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 3
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": [
    "## 延迟执行\n",
    "比如builder.add_node(d, defer=True)，就是说加了defer=True会延迟等待前面节点都执行完才执行，而不是并行有一个执行就可"
   ],
   "id": "59802c69739e588c"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-07-27T04:33:58.743572Z",
     "start_time": "2025-07-27T04:33:58.715698Z"
    }
   },
   "cell_type": "code",
   "source": [
    "import operator\n",
    "from typing import Annotated\n",
    "\n",
    "from typing_extensions import TypedDict\n",
    "\n",
    "from langgraph.graph import StateGraph, START, END\n",
    "\n",
    "\n",
    "class State(TypedDict):\n",
    "    # The operator.add reducer fn makes this append-only\n",
    "    aggregate: Annotated[list, operator.add]\n",
    "\n",
    "\n",
    "def a(state: State):\n",
    "    print(f'Adding \"A\" to {state[\"aggregate\"]}')\n",
    "    return {\"aggregate\": [\"A\"]}\n",
    "\n",
    "\n",
    "def b(state: State):\n",
    "    print(f'Adding \"B\" to {state[\"aggregate\"]}')\n",
    "    return {\"aggregate\": [\"B\"]}\n",
    "\n",
    "\n",
    "def b_2(state: State):\n",
    "    print(f'Adding \"B_2\" to {state[\"aggregate\"]}')\n",
    "    return {\"aggregate\": [\"B_2\"]}\n",
    "\n",
    "\n",
    "def c(state: State):\n",
    "    print(f'Adding \"C\" to {state[\"aggregate\"]}')\n",
    "    return {\"aggregate\": [\"C\"]}\n",
    "\n",
    "\n",
    "def d(state: State):\n",
    "    print(f'Adding \"D\" to {state[\"aggregate\"]}')\n",
    "    return {\"aggregate\": [\"D\"]}\n",
    "\n",
    "\n",
    "builder = StateGraph(State)\n",
    "builder.add_node(a)\n",
    "builder.add_node(b)\n",
    "builder.add_node(b_2)\n",
    "builder.add_node(c)\n",
    "builder.add_node(d, defer=True)\n",
    "builder.add_edge(START, \"a\")\n",
    "builder.add_edge(\"a\", \"b\")\n",
    "builder.add_edge(\"a\", \"c\")\n",
    "builder.add_edge(\"b\", \"b_2\")\n",
    "builder.add_edge(\"b_2\", \"d\")\n",
    "builder.add_edge(\"c\", \"d\")\n",
    "builder.add_edge(\"d\", END)\n",
    "graph = builder.compile()"
   ],
   "id": "14fa4b57ada9c09c",
   "outputs": [],
   "execution_count": 4
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-07-27T05:50:27.930123Z",
     "start_time": "2025-07-27T05:50:27.708238Z"
    }
   },
   "cell_type": "code",
   "source": [
    "from IPython.display import Image, display\n",
    "\n",
    "display(Image(graph.get_graph().draw_mermaid_png()))"
   ],
   "id": "46757ca21f2b54bd",
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKEAAAITCAIAAADgruu2AAAAAXNSR0IArs4c6QAAIABJREFUeJztnXdcU+f+x5/sRUKAsJeCKOLAFnBWsbXiKFXBOnCitlWqVWu1dbRua1u1ep1Xezuuq9ZatYq7P20REdGqRRQHIHuTnRByknN+f6SXer1BEXJGHp73yz+SnJPz/Zg3z5nPOQ+LIAiAgBo23QEQpIMcww9yDD/IMfwgx/CDHMMPl+4Az0Fdg+mUmEFrNeqsWANOd5xmwROwxVKORMaRefBcFT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UepJSq+26ZO+unr96P7DnxSV3PFUBL8cObR/n3HP/kqnsF7xQ96/mnV00fLeclefiWNW7fjXTABIufyqqzFK3Ths0psx3dePc65qcq6ZfDopaMxAFxUParv1Enbt40p2IZrPZXboLiWspB88MBMWbu3QXUpBIZqvBwglbP8Qfk2RxiPY/p9zfb1u3Vf2T0SIBC71DfbP6ft4hsx592sH5vxk3aCmJlmtFo69yyoK98D5Kd839a26Io1vOz7ZZzFt0N/Xh8DBjkV5XV9vb3cqjuNqTaXdSWazic+3fy8Cm82Vu3o5MKRSVd7UJDPWwOfZ6cHy7Aw5vz6evaEDNV1x6XcMAMhO1xQ8sMr9SN8yMQRNmaZdJ05kf4r+v/T3AwEAdH/FVcjDNFVUXEylHU2VXsDHKBPMFMcAgKFTvA3VWm21ke4g5KKtNhqqtUOneFNZlBHr6kYObykTuLrA2n9PU6lv0OjHzqf6XmdmOQYAnP6+ymTmuQfCtm1WlmhEfGxYMqUt2AbjHAMA/kzTZKTWeoe5uwfI6M7iAJQl2qo8Zd83FJGx9PzhMtExAAAzE5eP11aVYoDDk3mKJW5MuV+7+RhUJm2NEVgw70Be/1EKHp+2e3wY6tiGXm19cFP36LbeZMBZbBaXz+XwORw+l7Ay9B5zK2axmq0Ws4XACaGEHdbDpdPLUhc5+aeknx2MyY4baTDiykqzQWsxaC0WM2G1MjEzh8Pi8lkSGVci47r78AViphyzOIdjRGtgyt8agjyQY/hBjuEHOYYf5Bh+kGP4+X+hXZVaH5pxjQAAAABJRU5ErkJggg==",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "execution_count": 7
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-07-27T04:33:59.440463Z",
     "start_time": "2025-07-27T04:33:59.437520Z"
    }
   },
   "cell_type": "code",
   "source": "",
   "id": "c1ade5a0c5324235",
   "outputs": [],
   "execution_count": null
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
